#ifndef KERN_KALLOC_H
#define KERN_KALLOC_H

#include "spinlock.h"

typedef struct {
    uint64_t page_count;
    struct spinlock lock;
    struct run *free_list; /* Free list of physical pages */
} kmem_t;

extern kmem_t kmem;

void alloc_init();
void *kalloc();
void kfree(void*);
void free_range(void *, void *);
void check_free_list();

#endif /* !KERN_KALLOC_H */
